package com.example.coupon.service;

import com.example.coupon.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public String addUser(String name, String phone) {
        Integer result = userMapper.insertUser(name, phone);
        if (result > 0) {
            return "添加用户成功";
        }
        return "添加用户失败";
    }
}